#####custom
prefix_xilinx=/usr/local/mscore_xilinx
include platform/xilinx_linux.mk
prefix_x8664=/usr/local/mscore
include platform/x8664_linux.mk
prefix_aarch64=/usr/local/mscore_aarch64
include platform/aarch64_linux.mk
prefix_armv7l=/usr/local/mscore_armv7l
include platform/armv7l_linux.mk
export PKG_CONFIG_PATH:=${prefix_x8664}/lib/pkgconfig:${prefix_aarch64}/lib/pkgconfig:${prefix_armv7l}/lib/pkgconfig:${prefix_xilinx}/lib/pkgconfig:$PKG_CONFIG_PATH
#########
PROGRAM_NAME=libmscommon

OUT_LIB=out/lib
OUT_BIN=out/bin
OUT_INCLUDE=out/include/$(PROGRAM_NAME)

OUT_JNISRC=out/$(PROGRAM_NAME)jni_source
OUT_JNILIB=$(OUT_JNISRC)/lib
OUT_JNIINCLUDE=$(OUT_JNISRC)/include

D_BASEAPI_FLAGS= \
    -DOS_LINUX_SOC 

CFLAGS_SHARE=-shared -fPIC
C_SRC= \
	src/denc/mscrc.c \
	src/denc/msdenc.c \
	src/denc/msdes.c \
	src/denc/msaes.c \
	src/denc/msmd5.c \
	src/denc/mshash.c \
	src/mscjson.c \
	src/mscommon_inner.c \
	src/msenv.c \
	src/msepoll.c \
	src/msfifo.c \
	src/msmd.c \
	src/msmem.c \
	src/msnetwork.c \
	src/msnetframe.c \
	src/msreboot.c \
	src/mssignal.c \
	src/msstring.c \
	src/msthread.c \
	src/mssysctl.c \
	src/mstime.c

default: x8664

clean:
	rm  out -fr
help:
	@echo "USAGE:make target"
	@echo "    all		Produce the ${PROGRAM_NAME}.so,and install it"
	@echo "    clean		Clear out"
	@echo "    msfifo_api_sample	Sample program with ${PROGRAM_NAME} api"
	@echo "    msmem_api_sample	Sample program with ${PROGRAM_NAME} api"

